\section{A DSL for \emph{Security@Runtime}}
\label{sec:DSL}


\begin{figure*}[t]
	\center
	\resizebox{\textwidth}{!}{\includegraphics{DSL.png}}	
	\caption{The \SAR Metamodel for Specification and Enforcement of Security Policies in Java-based Systems. Yellow and Red classes are classes extracted from Java and policy metamodels, respectively.}
	\label{fig:SpecificationLanguage}
\end{figure*}


At the center of the \SAR approach is a DSL capturing its various concepts. This DSL is shown in Figure~\ref{fig:SpecificationLanguage}. The \SAR approach is threefold: it includes (1) the specification of abstract security policies, (2) monitoring of change in the target application and (3) the mapping of policies to the target system. This section describes the \SAR metamodel and rationale, illustrating the core and difficult points with situations extracted from the motivating example. 



\input{SecurityRules}

\input{StaticMapping}
\input{ApplicationState}
\input{DynamicBinding}
\input{Translation}


